import request from '@/utils/request';

export async function getDriveParaLibByPage(params: any) {
  return request('/api/drivePara/getDriveParaLibByPage', {
    method: 'POST',
    data: params,
  });
}

export async function addDriveParaLib(params: any) {
  return request('/api/drivePara/addDriveParaLib', {
    method: 'POST',
    data: params,
  });
}

export async function delDriveParaLib(params: any) {
  return request('/api/drivePara/delDriveParaLib', {
    method: 'POST',
    data: params,
  });
}

export async function updateDriveParaLib(params: any) {
  return request('/api/drivePara/updateDriveParaLib', {
    method: 'POST',
    data: params,
  });
}

export async function uploadDriveParaLibExcel(params: any) {
  return request('/api/drivePara/uploadDriveParaLibExcel', {
    method: 'POST',
    requestType: 'form',
    data: params,
  });
}

/**
 * 下载excel
 * @param params
 * @returns
 */
export async function driveParaLibExcelExport() {
  return request('/api/drivePara/driveParaLibExcelExport', {
    method: 'POST',
    responseType: 'blob',
  });
}
